package com.cjy;

public class ComparableDemo2 {
    public static void main(String[] args) {
        ComparableDemo1[] comparableDemo1ss={
                new ComparableDemo1(5,6),
                new ComparableDemo1(4,2),
                new ComparableDemo1(7,8),
        };
        java.util.Arrays.sort(comparableDemo1ss);
        for (ComparableDemo1 comparableDemo1s:comparableDemo1ss){
            System.out.print(comparableDemo1s+ " ");
            System.out.println();
        }
    }
}
